package com.yan.zrefreshview;

import ohos.app.Context;

public class UIUtil {
    /**
     * vp转px
     */
    public static int vpToPx(Context context, int vp) {
        int scale = context.getResourceManager().getDeviceCapability().screenDensity / 160;
        return scale * vp;
    }
}